package com.bluesky.plum.validate.validator;

/**
 * a value can not be empty(string,number)
 * 
 * @author hz00260
 * 
 */
public class RequiredValidator extends Validator {
	public RequiredValidator() {
		description="required";
	}

	@Override
	public void validate() {
		if (target == null)
			result = false;
		else if (target instanceof String && ((String) target).length() == 0)
			result = false;
		else
			result = true;
	}
}
